package c.c.b.b.d;

import c.c.b.b.d.c.b;
import c.c.b.b.d.e.a;
import c.c.b.b.f.p;
import c.c.b.b.f.q;
import java.io.File;
import java.util.List;

/* compiled from: FileLoader */
public class d implements a {
    public final /* synthetic */ b a;

    public d(b bVar) {
        this.a = bVar;
    }

    public void a(long j, long j2) {
        List<a> list = this.a.c;
        if (list != null) {
            for (a a : list) {
                try {
                    a.a(j, j2);
                } catch (Throwable th) {
                    q.b(th, "file loader onDownloadProgress error", new Object[0]);
                }
            }
        }
    }

    public void b(p<File> pVar) {
        List<a> list = this.a.c;
        if (list != null) {
            for (a b : list) {
                try {
                    b.b(pVar);
                } catch (Throwable th) {
                    q.b(th, "file loader onErrorResponse error", new Object[0]);
                }
            }
            this.a.c.clear();
        }
        b bVar = this.a;
        c.this.a.remove(bVar.a);
    }

    public void a(p<File> pVar) {
        List<c.a> list = this.a.c;
        if (list != null) {
            for (c.a aVar : list) {
                try {
                    aVar.a(pVar);
                } catch (Throwable th) {
                    q.b(th, "file loader onResponse error", new Object[0]);
                }
                try {
                    aVar.a(this.a.a, (File) pVar.a);
                } catch (Throwable th2) {
                    q.b(th2, "file loader putFile error", new Object[0]);
                }
            }
            this.a.c.clear();
        }
        b bVar = this.a;
        c.this.a.remove(bVar.a);
    }
}
